#define _CRT_SECURE_NO_WARNINGS 1


#include<stdio.h>

int removeElement(int* nums, int numsSize, int val)
{
    int src = 0, dst = 0;
    while (src < numsSize)
    {
        if (nums[src] != val)
        {
            nums[dst] = nums[src];
            dst++;
        }
        src++;
    }
    return dst;
}
int main()
{
    int nums[] = { 3,2,2,3 }, val = 3;
    int ret = removeElement(&nums, 4, val);
    printf("%d\n", ret);
	return 0;
}